/**
 * @author Federico Consoli
 *
 * Released under GNU GPLv3 (http://www.gnu.org/licenses/gpl-3.0.txt)
 */

#include "eccezioni.h"

using namespace std;

void Exception_class::exc(int num_exc){
       switch(num_exc){
           case 1:
               cout << "Error in listensocket\n";
               break;
           case 2:
               cout << "Error in Response, servizio gia' presente\n";
               break;
           case 3:
               cout << "Error in Response, in creation of input variables \n";
               break;
           case 4:
               cout << "Error in Response, in creation of output variables \n";
               break;
           case 5:
               cout << "Error in receiving the packet, unrecognized parameter \n";
               break;
           case 6:
               cout << "Error in creation the packet, unrecognized parameter \n";
               break;
           case 7:
               cout << "Error to send the packet, unrecognized parameter \n";
               break;
           case 8:
               cout << "Error in deleting the packet, unrecognized parameter \n";
               break;
           case 9:
               cout << "Error in initialization the mutex \n";
               break;
           case 10:
               cout << "Error in registration service, can not connect to Register \n";
               break;
           case 11:
               cout << "Error in canceling the service, trying to delete a service not present \n";
               break;
           case 12:
               cout << "Error in canceling the service, can not connect to Register \n";
               break;
           case 13:
               cout << "Error in thread creation  \n";
               break;
           case 14:
               cout << "Error in deleting the mutex \n";
               break;
           case 15:
               cout << "Error in register, unable to listen on the IP / port \n";
               break;
           case 16:
               cout << "Error in client, can not connect to Register  \n";
               break;
           case 17:
               cout << "Error in client, Error in orizflip, Unable to connect to the service; inconsistency of information! \n";
               break;
           case 18:
               cout << "Error in client, Error in rotate, Unable to connect to the service; inconsistency of information! \n";
               break;
           case 19:
               cout << "Error in client, Error in store, Unable to connect to the service; inconsistency of information! \n";
               break;
           case 20:
               cout << "Error in client, Error in get_img, Unable to connect to the service; inconsistency of information! \n";
               break;
           case 21:
               cout << "Error in client, Error in get_list, Unable to connect to the service; inconsistency of information! \n";
               break;
           case 22:
               cout << "Error in server, not recognized in register! \n";
           default:
                cout << "Unknown error number " + num_exc+ '\n';
                break;
       }
        
        
    }
